TYBUILD=../../tybuild/bin/Release/tybuild.exe

PECORLIB=mscorlib.dll
ORIGSOURCES=corlib.dll.sources
SOURCESOPTIONS=corlib.dll.sources.options
SOURCELIST=corlib.dll.ty.sources

.PHONY: clean

all: $(PECORLIB)

$(TYBUILD):
	cd ../../tybuild && make

$(SOURCELIST): $(ORIGSOURCES) $(SOURCESOPTIONS)
	cat $(SOURCESOPTIONS) > $(SOURCELIST)
	echo '#assemblyname $(PECORLIB)' >> $(SOURCELIST)
	echo '' >> $(SOURCELIST)
	cat $(ORIGSOURCES) >> $(SOURCELIST)

$(PECORLIB): $(SOURCELIST) $(TYBUILD)
	$(TYBUILD) /t $(SOURCELIST)

clean:
	rm -rf $(PECORLIB) $(SOURCELIST)

